package com.ikun.service.impl;

import com.ikun.mapper.AddressMapper;
import com.ikun.pojo.Address;
import com.ikun.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressMapper addressMapper;

    @Override
    public List<Address> getListAddress(Integer userId) {
        return addressMapper.getListAddressByUserId(userId);
    }

    @Override
    public void addUserAddress(Integer userId, String contactName, String phoneNumber, byte sex, String tag, String deliveryAddress, String doorPlate) {
        addressMapper.addUserAddress(userId,contactName,phoneNumber,sex,tag,deliveryAddress,doorPlate);
    }


}
